#include "widget.h"
#include "ui_widget.h"
#include <QTimer>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    timer = new QTimer(this);
    connect(timer,&QTimer::timeout,this,[=](){
         int val = ui->progressBar->value();
         if(val >= 100)
         {
             timer->stop();
             return;
         }
         ui->progressBar->setValue(val + 1);
    });
    timer->start(200);

}

Widget::~Widget()
{
    delete ui;
}

